package org.ldx.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 用来限制奖品等级的枚举
 */
@AllArgsConstructor
@Getter
public enum ActivityPrizeTiersEnum {
    FIRST_PRIZE(1,"一等奖"),
    SECOND_PRIZE(2,"二等奖"),
    THIRD_PRIZE(3,"三等奖");

    private final Integer code;
    private final String message;
    public static ActivityPrizeTiersEnum forName(String name){
        for(ActivityPrizeTiersEnum activityStatusEnum:ActivityPrizeTiersEnum.values()){
            if(activityStatusEnum.name().equalsIgnoreCase(name)){
                return activityStatusEnum;
            }
        }
        return null;
    }
}
